var utils = require('../../utils/util.js');
var httpUrl = getApp().globalData.httpUrl;
var codeName = getApp().globalData.codeName;
// pages/adderss/adderss.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
      var that=this;
      that.setData({
        cityName:wx.getStorageSync("city").cityname
      })
      utils.http(httpUrl +"serchcity",{
        code:codeName
      },function(res){
        console.log(res);
        that.setData({
          dataList: res.dataList
        })
      })
  },

  //进入区域选择
  chooseLocation: function (e) {
    var cityid = e.currentTarget.dataset.cityid;
    wx.navigateTo({
      url: '../adderss/adderss_city/adderss_city?cityid=' + cityid,
    })
  }
})